package com.product.pojo;

import java.math.BigDecimal;

public class Radar {
    private long second;
    private int millisecond;
    private int id;
    private String road;
    private String objClass;
    private int objLength;
    private int objWidth;
    private int orientationAngle;
    private int x;
    private int y;
    private int xSpeed;
    private int ySpeed;
    private int speed;
    private int aSpeed;
    private int aXSpeed;
    private int aYSpeed;
    private float objectRCS;
    private int longitude;
    private int latitude;
    private int event;
    private int lane;
    private BigDecimal objectLatitude;
    private BigDecimal objectLongitude;
    private BigDecimal objectAltitude;
    private BigDecimal time;

    public int getaSpeed() {
        return aSpeed;
    }

    public void setaSpeed(int aSpeed) {
        this.aSpeed = aSpeed;
    }

    public int getaXSpeed() {
        return aXSpeed;
    }

    public void setaXSpeed(int aXSpeed) {
        this.aXSpeed = aXSpeed;
    }

    public int getaYSpeed() {
        return aYSpeed;
    }

    public void setaYSpeed(int aYSpeed) {
        this.aYSpeed = aYSpeed;
    }

    public int getEvent() {
        return event;
    }

    public void setEvent(int event) {
        this.event = event;
    }

    public int getId() {
        return id;
    }

    public void setId(int id) {
        this.id = id;
    }

    public int getLane() {
        return lane;
    }

    public void setLane(int lane) {
        this.lane = lane;
    }

    public int getLatitude() {
        return latitude;
    }

    public void setLatitude(int latitude) {
        this.latitude = latitude;
    }

    public int getLongitude() {
        return longitude;
    }

    public void setLongitude(int longitude) {
        this.longitude = longitude;
    }

    public int getMillisecond() {
        return millisecond;
    }

    public void setMillisecond(int millisecond) {
        this.millisecond = millisecond;
    }

    public String getObjClass() {
        return objClass;
    }

    public void setObjClass(String objClass) {
        this.objClass = objClass;
    }

    public BigDecimal getObjectAltitude() {
        return objectAltitude;
    }

    public void setObjectAltitude(BigDecimal objectAltitude) {
        this.objectAltitude = objectAltitude;
    }

    public BigDecimal getObjectLatitude() {
        return objectLatitude;
    }

    public void setObjectLatitude(BigDecimal objectLatitude) {
        this.objectLatitude = objectLatitude;
    }

    public BigDecimal getObjectLongitude() {
        return objectLongitude;
    }

    public void setObjectLongitude(BigDecimal objectLongitude) {
        this.objectLongitude = objectLongitude;
    }

    public float getObjectRCS() {
        return objectRCS;
    }

    public void setObjectRCS(float objectRCS) {
        this.objectRCS = objectRCS;
    }

    public int getObjLength() {
        return objLength;
    }

    public void setObjLength(int objLength) {
        this.objLength = objLength;
    }

    public int getObjWidth() {
        return objWidth;
    }

    public void setObjWidth(int objWidth) {
        this.objWidth = objWidth;
    }

    public int getOrientationAngle() {
        return orientationAngle;
    }

    public void setOrientationAngle(int orientationAngle) {
        this.orientationAngle = orientationAngle;
    }

    public String getRoad() {
        return road;
    }

    public void setRoad(String road) {
        this.road = road;
    }

    public long getSecond() {
        return second;
    }

    public void setSecond(long second) {
        this.second = second;
    }

    public int getSpeed() {
        return speed;
    }

    public void setSpeed(int speed) {
        this.speed = speed;
    }

    public BigDecimal getTime() {
        return time;
    }

    public void setTime(BigDecimal time) {
        this.time = time;
    }

    public int getX() {
        return x;
    }

    public void setX(int x) {
        this.x = x;
    }

    public int getxSpeed() {
        return xSpeed;
    }

    public void setxSpeed(int xSpeed) {
        this.xSpeed = xSpeed;
    }

    public int getY() {
        return y;
    }

    public void setY(int y) {
        this.y = y;
    }

    public int getySpeed() {
        return ySpeed;
    }

    public void setySpeed(int ySpeed) {
        this.ySpeed = ySpeed;
    }

    public void calTime() {
        if (this.millisecond < 10) {
            this.time = new BigDecimal(this.second + "00" + this.millisecond);
        } else if (this.millisecond < 100) {
            this.time = new BigDecimal(this.second + "0" + this.millisecond);
        } else {
            this.time = new BigDecimal(this.second + "" + this.millisecond);
        }
    }

    @Override
    public String toString() {
        return this.getSecond() + "," +
                this.getMillisecond() + "," +
                this.getId() + "," +
                this.getRoad() + "," +
                this.getObjClass() + "," +
                this.getObjLength() + "," +
                this.getObjWidth() + "," +
                this.getOrientationAngle() + "," +
                this.getX() + "," +
                this.getY() + "," +
                this.getxSpeed() + "," +
                this.getySpeed() + "," +
                this.getSpeed() + "," +
                this.getaSpeed() + "," +
                this.getaXSpeed() + "," +
                this.getaYSpeed() + "," +
                this.getObjectRCS() + "," +
                this.getLongitude() + "," +
                this.getLatitude() + "," +
                this.getEvent() + "," +
                this.getLane() + "," +
                this.getObjectLatitude() + "," +
                this.getObjectLongitude() + "," +
                this.getObjectAltitude();
    }
}
